package com.nuanshui.heatedloan.entity;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Table;

import com.nuanshui.heatedloan.extension.jpasearch.SearchType;
import com.nuanshui.heatedloan.extension.jpasearch.SearchTypeValue;



/**
 * 
 * @ClassName: Dictionary
 * @Description: 系统字典内容
 * @author 郭浩
 * @date 2014-8-3 下午12:20:13
 * 
 */
@Entity
@Table(name = "t_dictionary")
public class Dictionary extends IdEntity {
	/**
	 * 字典的key值
	 */
	@SearchType(value=SearchTypeValue.LIKE)
	private String name;
	/**
	 * 字典的value
	 */

	private String value;
	/**
	 * 字典的类型
	 */
	@SearchType(value=SearchTypeValue.LIKE)
	private String type;
	/**
	 * 字典内容的名字
	 */
	@SearchType(value=SearchTypeValue.LIKE)
	private String realName;

	private int orderNum;

	private String source;
	private String Color;

	private Date createTime;
	private Date modifyTime;

	public String getName() {
		return name;
	}

	public void setName(final String name) {
		this.name = name;
	}

	public String getValue() {
		return value;
	}

	public void setValue(final String value) {
		this.value = value;
	}

	public String getType() {
		return type;
	}

	public void setType(final String type) {
		this.type = type;
	}

	public String getRealName() {
		return realName;
	}

	public void setRealName(final String realName) {
		this.realName = realName;
	}

	public int getOrderNum() {
		return orderNum;
	}

	public void setOrderNum(final int orderNum) {
		this.orderNum = orderNum;
	}

	public String getSource() {
		return source;
	}

	public void setSource(final String source) {
		this.source = source;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((Color == null) ? 0 : Color.hashCode());
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		result = prime * result + orderNum;
		result = prime * result
				+ ((realName == null) ? 0 : realName.hashCode());
		result = prime * result + ((type == null) ? 0 : type.hashCode());
		result = prime * result + ((value == null) ? 0 : value.hashCode());
		return result;
	}

	@Override
	public boolean equals(final Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Dictionary other = (Dictionary) obj;
		if (Color == null) {
			if (other.Color != null)
				return false;
		} else if (!Color.equals(other.Color))
			return false;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		if (orderNum != other.orderNum)
			return false;
		if (realName == null) {
			if (other.realName != null)
				return false;
		} else if (!realName.equals(other.realName))
			return false;
		if (type == null) {
			if (other.type != null)
				return false;
		} else if (!type.equals(other.type))
			return false;
		if (value == null) {
			if (other.value != null)
				return false;
		} else if (!value.equals(other.value))
			return false;
		return true;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(final Date createTime) {
		this.createTime = createTime;
	}

	public String getColor() {
		return Color;
	}

	public void setColor(final String color) {
		Color = color;
	}
}
